home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / util / comm / araintel.sit / Intel 9600EX < prev    next >
Encoding:
Text File  |  1992-09-30  |  3.3 KB  |  214 lines

  1. ! Intel 9600EX CCL script for ARA.
  2. ! Jim Gaynor - 9/30/92
  3. ! Based on:
  4. ! "Microcom QX - 6/28/91"
  5. @ORIGINATE
  6. @ANSWER
  7. !
  8. @LABEL 1
  9. serreset 9600, 0, 8, 1
  10. !
  11. ! first sync up the modem
  12. !
  13. matchclr
  14. matchstr 1 3 "A"
  15. settries 0
  16. @LABEL 2
  17. write "A"
  18. matchread 10
  19. inctries
  20. iftries 4 3
  21. jump 2
  22. @LABEL 3
  23. matchclr
  24. settries 0
  25. matchstr 1 4 "OK\13\10"
  26. write "T\13"
  27. matchread 30
  28. !
  29. !    Now, recall the modems factory configuration
  30. !
  31. @LABEL 4
  32. matchstr 1 5 "OK\13\10"
  33. write "AT&F\13"
  34. matchread 30
  35. inctries
  36. iftries 2 59
  37. ! Modem is not responding, reset
  38. DTRClear
  39. pause 5
  40. DTRSet
  41. jump 4
  42. !
  43. ! Next, Set up the configuration:
  44. ! Echo off, serial port flow control off, modem flow control off
  45. !
  46. @LABEL 5
  47. matchstr 1 6 "OK\13\10"
  48. write "ATE0\\Q0\\G0\13"
  49. matchread 30
  50. jump 59
  51. !
  52. ! Connect in direct mode, no mnp, no speed conversion; go on hook and reset when DTR drops
  53. !
  54. @LABEL 6
  55. matchstr 1 7 "OK\13\10"
  56. write "AT\\N1&D3\13"
  57. matchread 30
  58. jump 59
  59. !
  60. ! Set up the speaker: If speaker flag is "1", jump to 8;  else turn off speaker
  61. @LABEL 7
  62. ifstr 2 8 "1"
  63. matchstr 1 8 "OK\13\10"
  64. write "ATM0\13"
  65. matchread 30
  66. jump 59
  67. !
  68. ! The modem is ready.  So enable answering, or originate a call
  69. !
  70. @LABEL 8
  71. ifANSWER 30
  72. note "Dialing ^1" 3
  73. write "ATS0=0DT^1\13"
  74. !
  75. @LABEL 9
  76. matchstr 1 11 "CONNECT 1200\13\10"
  77. matchstr 2 12 "CONNECT 2400\13\10"
  78. matchstr 3 13 "CONNECT 4800\13\10"
  79. matchstr 4 14 "CONNECT 9600\13\10"
  80. matchstr 5 50 "NO CARRIER\13\10"
  81. matchstr 6 50 "ERROR\13\10"
  82. matchstr 7 52 "NO DIALTONE\13\10"
  83. matchstr 8 53 "BUSY\13\10"
  84. matchstr 9 54 "NO ANSWER\13\10"
  85. matchread 700
  86. jump 59
  87. !
  88. @LABEL 11
  89. note "Communicating at 1200 bps." 2
  90. CommunicatingAt 1200
  91. jump 15
  92. !
  93. @LABEL 12
  94. note "Communicating at 2400 bps." 2
  95. CommunicatingAt 2400
  96. jump 15
  97. !
  98. @LABEL 13
  99. note "Communicating at 4800 bps." 2
  100. CommunicatingAt 4800
  101. jump 15
  102. !
  103. @LABEL 14
  104. note "Communicating at 9600 bps." 2
  105. CommunicatingAt 9600
  106. !
  107. @LABEL 15
  108. ifANSWER 16
  109. pause 30
  110. @LABEL 16
  111. exit 0
  112. !
  113. ! @ANSWER
  114. ! Set up the modem to answer
  115. @LABEL 30
  116. write "ATS0=1\13"
  117. matchstr 1 31 "OK\13\10"
  118. matchread 30
  119. jump 59
  120. !
  121. @LABEL 31
  122. matchstr 1  32 "RING\13\10"
  123. matchstr 2  11 "CONNECT 1200\13\10"
  124. matchstr 3  12 "CONNECT 2400\13\10"
  125. matchstr 4  13 "CONNECT 4800\13\10"
  126. matchstr 5  14 "CONNECT 9600\13\10"
  127. matchstr 6  50 "NO CARRIER\13\10"
  128. matchstr 7  50 "ERROR\13\10"
  129. matchstr 8  52 "NO DIALTONE\13\10"
  130. matchstr 9  53 "BUSY\13\10"
  131. matchstr 10 54 "NO ANSWER\13\10"
  132. matchread 700
  133. jump 31
  134. !
  135. @LABEL 32
  136. userhook 1
  137. note "Answering phoneâ•”" 2
  138. jump 31
  139. !
  140. ! 50: error messages
  141. !
  142. @LABEL 50
  143. exit -6021
  144. !
  145. @LABEL 52
  146. exit -6020
  147. !
  148. @LABEL 53
  149. exit -6022
  150. !
  151. @LABEL 54
  152. exit -6023
  153. !
  154. @LABEL 59
  155. exit -6019
  156. !
  157. ! Hang up the modem
  158. !
  159. @HANGUP
  160. @LABEL 60
  161. settries 0
  162. @LABEL 61
  163. write "ATH\13"
  164. matchclr
  165. matchstr 1 63 "OK\13\10"
  166. matchstr 2 63 "NO CARRIER\13\10"
  167. matchstr 3 63 "ERROR\13\10"
  168. matchread 30
  169. inctries
  170. iftries 3 63
  171. ! no response, try escape sequence
  172. write "+++"
  173. matchclr
  174. matchstr 1 62 "OK\13\10"
  175. matchread 20
  176. !
  177. ! No response from modem, toggle DTR
  178. !
  179. DTRClear
  180. pause 5
  181. DTRSet
  182. jump 61
  183. !
  184. @LABEL 62
  185. pause 5
  186. write "ATH\13"
  187. matchstr 1 63 "OK\13\10"
  188. matchstr 2 63 "NO CARRIER\13\10"
  189. matchstr 3 63 "ERROR\13\10"
  190. matchread 70
  191. jump 61
  192. !
  193. ! Recall factory settings
  194. !
  195. @LABEL 63
  196. pause 5
  197. matchclr
  198. matchstr 1 64 "OK\13\10"
  199. write "AT&F\13"
  200. matchread 30
  201. !
  202. ! Turn off auto answer
  203. !
  204. @LABEL 64
  205. write "ATS0=0\13"
  206. matchstr 1 65 "OK\13\10"
  207. matchread 30
  208. !
  209. ! Add delay to make sure other side of connection hangs up for call back.
  210. !
  211. @LABEL 65
  212. exit 0
  213.